package com.siyoumi.app.sys.task.service.del_data;

import com.siyoumi.app.sys.task.service.DelDataHandle;
import com.siyoumi.entity.SysLog;
import com.siyoumi.mybatispuls.JoinWrapperPlus;
import com.siyoumi.service.SysLogService;
import com.siyoumi.util.XDate;

public class DelDataLog
        extends DelDataHandle {
    @Override
    public void handle() {
        //创建时间小于1个月
        JoinWrapperPlus<SysLog> query = SysLogService.getBean().join();
        query.lt("log_create_date", XDate.now().minusMonths(1));
        SysLogService.getBean().remove(query);
    }
}
